package com.ruoyi.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysTransactionMapper;
import com.ruoyi.system.domain.SysTransaction;
import com.ruoyi.system.service.ISysTransactionService;

/**
 * 消费记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-21
 */
@Service
public class SysTransactionServiceImpl implements ISysTransactionService 
{
    @Autowired
    private SysTransactionMapper sysTransactionMapper;

    /**
     * 查询消费记录
     * 
     * @param transactionId 消费记录主键
     * @return 消费记录
     */
    @Override
    public SysTransaction selectSysTransactionByTransactionId(Long transactionId)
    {
        return sysTransactionMapper.selectSysTransactionByTransactionId(transactionId);
    }

    /**
     * 查询消费记录列表
     * 
     * @param sysTransaction 消费记录
     * @return 消费记录
     */
    @Override
    public List<SysTransaction> selectSysTransactionList(SysTransaction sysTransaction)
    {
        return sysTransactionMapper.selectSysTransactionList(sysTransaction);
    }

    /**
     * 新增消费记录
     * 
     * @param sysTransaction 消费记录
     * @return 结果
     */
    @Override
    public int insertSysTransaction(SysTransaction sysTransaction)
    {
        return sysTransactionMapper.insertSysTransaction(sysTransaction);
    }

    /**
     * 修改消费记录
     * 
     * @param sysTransaction 消费记录
     * @return 结果
     */
    @Override
    public int updateSysTransaction(SysTransaction sysTransaction)
    {
        return sysTransactionMapper.updateSysTransaction(sysTransaction);
    }

    /**
     * 批量删除消费记录
     * 
     * @param transactionIds 需要删除的消费记录主键
     * @return 结果
     */
    @Override
    public int deleteSysTransactionByTransactionIds(Long[] transactionIds)
    {
        return sysTransactionMapper.deleteSysTransactionByTransactionIds(transactionIds);
    }

    /**
     * 删除消费记录信息
     * 
     * @param transactionId 消费记录主键
     * @return 结果
     */
    @Override
    public int deleteSysTransactionByTransactionId(Long transactionId)
    {
        return sysTransactionMapper.deleteSysTransactionByTransactionId(transactionId);
    }
}
